CREATE TABLE jms_dm.dm_terminal_long_summary_dt(
   dt                       date         comment '跑数日期'
  ,network_arrival_date     varchar(100) comment '日期'
  ,agent_code               varchar(100) comment '代理区编码'
  ,agent_name               varchar(100) comment '代理区名称'
  ,name                     varchar(100) comment '网点'
  ,end_network_network_code varchar(100) comment '网点code'
  ,waybill_count            int          comment '总量'
  ,count_four               int          comment '派-到（h）'
  ,count_five               int          comment '入-派（h）'
  ,count_six                int          comment '出-入（h）'
)
ENGINE=OLAP
DUPLICATE KEY(dt)
COMMENT "终端时长导数"
PARTITION BY RANGE (dt) (
    START ("2022-11-01") END ("2022-12-10") EVERY (INTERVAL 1 day)
)
DISTRIBUTED BY HASH(end_network_network_code) BUCKETS 2
PROPERTIES (
"replication_num" = "3",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "DAY",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.start" = "-180",
"dynamic_partition.end" = "3",
"dynamic_partition.prefix" = "p",
"dynamic_partition.buckets" = "2",
"in_memory" = "false",
"storage_format" = "V2"
);

